package com.kai.pojo;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.text.SimpleDateFormat;
import java.util.Date;

@Data
public class User {
    @ExcelProperty(value = "id",index = 0)
    @ColumnWidth(30)
    private String id;
    @ExcelProperty(value = "名字",index = 1)
    private String name;
    @ExcelProperty(value = "密码",index = 2)
    @ColumnWidth(30)
    private String password;
    @ExcelProperty(value = "性别",index = 3)
    private String sex;//性别
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat
    @com.alibaba.excel.annotation.format.DateTimeFormat("yyyy年MM月dd日HH时mm分ss秒")
    @ColumnWidth(26)
    @ExcelProperty(value = "创建时间",index = 4)
    private Date createtime;//创建时间
    @ExcelIgnore
    private int state;//状态
    @ExcelIgnore
    private int grade;//界别
    @ExcelIgnore
    private String code;//验证码
}
